//
//  SEHospitalizeHeadlinesCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/2.
//

import UIKit

struct SEHospitalizeHeadlinesCellModel {
    var title: String = ""
    var image: UIImage?
    var url: URL?
}

class SEHospitalizeHeadlinesCell: UITableViewCell {
    
    override func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .white
        contentView.backgroundColor = .white
    }

    func update(with viewModel: SEHospitalizeHeadlinesCellModel) {
        titleLabel.text = viewModel.title
        bgImageView.image = viewModel.image
    }
    
    @IBOutlet private weak var containerView: UIView! {
        didSet {
            containerView.setLayerCorners(rect: self.bounds, radius: 16)
            containerView.layer.borderWidth = 1
            containerView.layer.borderColor = UIColor(hex: "#EEEEEE").cgColor
            containerView.layer.masksToBounds = true
        }
    }
    
    @IBOutlet private weak var titleLabel: UILabel!
    @IBOutlet private weak var bgImageView: UIImageView!
}
